import request from "@/utiles/request";
//获取按钮列表
export const getBtnListAPI = (pageNo = 1 , pageSize = 999)=>request.get(`/btn/getBtnList?pageNo=${pageNo}&pageSize=${pageSize}`)
//添加或者修改按钮
export const AddOrUpdateBtnAPI = (data)=>{
    if(data._id) {
        return request.put(`/btn/updateBtn?id=${data._id}`,data)
    }else {
        return request.post('/btn/addBtn',data)
    }
}
//获取按钮详情
export const getBtnDetailAPI = (id)=>request.get(`/btn/getBtnDetail?id=${id}`)
//删除按钮
export const deleteBtnAPI = (id)=>request.delete(`/btn/deleteBtn?id=${id}`)